<template>
    <div>
        <el-card>
            <div class="card">
                <el-image :src="userStore.avatar" fit="fill" :lazy="true" class="image"></el-image>
                <div class="bottom">
                    <h3 class="name">{{ curHourToRangeName() }}好！{{ userStore.username }}</h3>
                    <p class="title">硅谷甄选运营平台</p>
                </div>
            </div>
        </el-card>
        <div class="behind">
            <svg-icon fileShortName="welcome" iconWidth="500px" iconHeight="400px"></svg-icon>
        </div>
    </div>
</template>

<script setup lang="ts">
import useUserStore from '@/store/modules/user'
import { curHourToRangeName } from '@/utils/HourUtil'

let userStore = useUserStore()
</script>

<style scoped lang="scss">
.card {
    display: flex;

    .image {
        height: 100px;
        width: 100px;
        border-radius: 50%;
    }

    .bottom {
        margin-left: 20px;

        .name {
            font-size: 20px;
            font-weight: bold;
            margin: 23px 0;
        }

        .title {
            font-style: italic;
            color: lightgray;
        }
    }
}

.behind {
   display: flex;
   justify-content: center;
}
</style>